const apiurl = new Map<string, string>();
// apiurl.set('queryEnumOptions', '/eslithe/queryEnumOptionsNew.action');
// apiurl.set('addEnumOptions', '/eslithe/add_dev_enum_options.action');
// apiurl.set('updateEnumOptions', '/eslithe/update_dev_enum_options.action');
// apiurl.set('delEnumOptions', '/eslithe/delete_dev_enum_options.action');

// apiName: url/uri/api name
export function getApiUrl(apiName: string) {
	let url = '';
	if (apiName.indexOf('http') === 0) {
		// 全量Url
		url = apiName;
	} else {
		let uri = '';
		if (apiName.indexOf('/') === 0) {
			//全量URI
			uri = apiName;
		} else {
			uri = apiurl.get(apiName);
			if (uri) {
				uri = BASE_API.URL_PRE + uri;
			} else {
				uri = BASE_API.URL_PRE + BASE_API.PROJECT_URI + '/' + apiName + '.action';
			}
		}
		url = BASE_API.SERVER_IP + uri;
	}
	return url;
}
